@hew-lang/sandbox-vm 0.6.1 → 0.6.3
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 +48 -4
- package/cli/test-runner.mjs +4 -1
- package/dist/interpreter/interpreter.d.ts +1 -1
- package/dist/interpreter/interpreter.js +1 -1
- package/dist/interpreter/parity-runner.js +1 -1
- package/dist/interpreter/run-program.d.ts +3 -2
- package/dist/interpreter/run-program.js +5 -3
- package/dist/interpreter/schema-validator.d.ts +9 -4
- package/dist/interpreter/schema-validator.js +15 -49
- package/dist/interpreter/strings.d.ts +21 -0
- package/dist/interpreter/strings.js +191 -0
- package/dist/interpreter/types.d.ts +6 -0
- package/dist/interpreter/unicode-data.d.ts +4 -0
- package/dist/interpreter/unicode-data.js +1673 -0
- package/dist/interpreter/unicode.d.ts +3 -0
- package/dist/interpreter/unicode.js +35 -0
- package/dist/interpreter/v1/actor-identity.d.ts +3 -0
- package/dist/interpreter/v1/actor-identity.js +7 -0
- package/dist/interpreter/v1/actor-waits.d.ts +6 -0
- package/dist/interpreter/v1/actor-waits.js +33 -0
- package/dist/interpreter/v1/browser-directory.d.ts +107 -0
- package/dist/interpreter/v1/browser-directory.js +288 -0
- package/dist/interpreter/v1/calendar.d.ts +4 -0
- package/dist/interpreter/v1/calendar.js +64 -0
- package/dist/interpreter/v1/codecs.js +8 -11
- package/dist/interpreter/v1/exec.d.ts +2 -2
- package/dist/interpreter/v1/exec.js +1761 -489
- package/dist/interpreter/v1/instructions.generated.d.ts +1135 -0
- package/dist/interpreter/v1/instructions.generated.js +106 -0
- package/dist/interpreter/v1/package-graph.d.ts +2 -0
- package/dist/interpreter/v1/package-graph.js +729 -0
- package/dist/interpreter/v1/package-validator.generated.d.ts +3 -0
- package/dist/interpreter/v1/package-validator.generated.js +75902 -0
- package/dist/interpreter/v1/package.d.ts +5 -645
- package/dist/interpreter/v1/package.js +0 -12
- package/dist/interpreter/v1/pipes.d.ts +1 -0
- package/dist/interpreter/v1/pipes.js +9 -6
- package/dist/interpreter/v1/scheduler.d.ts +8 -1
- package/dist/interpreter/v1/scheduler.js +50 -11
- package/dist/interpreter/v1/shims.d.ts +260 -7
- package/dist/interpreter/v1/shims.js +647 -175
- package/dist/interpreter/v1/structural.d.ts +2 -28
- package/dist/interpreter/v1/timestamp.d.ts +7 -0
- package/dist/interpreter/v1/timestamp.js +54 -0
- package/dist/interpreter/v1/validate.d.ts +8 -2
- package/dist/interpreter/v1/validate.js +284 -200
- package/dist/interpreter/v1/value-operations.d.ts +11 -3
- package/dist/interpreter/v1/value-operations.js +70 -18
- package/dist/interpreter/values.d.ts +30 -8
- package/dist/interpreter/values.js +31 -5
- package/dist/interpreter/worker.js +4 -3
- package/package.json +4 -4
|
@@ -8,8 +8,15 @@ export declare class FrameScheduler {
|
|
|
8
8
|
private readonly replaySteps;
|
|
9
9
|
private nextTicket;
|
|
10
10
|
private replayIndex;
|
|
11
|
+
private readonly pendingHostOperations;
|
|
12
|
+
private hostReady;
|
|
13
|
+
submitHost<T>(id: string, operation: Promise<T>, completed: (result: T) => void, failed: (error: unknown) => void): void;
|
|
14
|
+
retireHost(): Promise<void>;
|
|
11
15
|
constructor(trace: TraceBuilder, policy: "round_robin" | "chaos");
|
|
12
16
|
enqueue(id: string, resume: () => void): void;
|
|
13
17
|
after(nanos: bigint, wake: () => void): () => void;
|
|
14
|
-
|
|
18
|
+
hasRunnableWork(): boolean;
|
|
19
|
+
advanceSlice(): void;
|
|
20
|
+
private fireTimers;
|
|
21
|
+
run(): Promise<void>;
|
|
15
22
|
}
|
|
@@ -10,6 +10,28 @@ export class FrameScheduler {
|
|
|
10
10
|
replaySteps;
|
|
11
11
|
nextTicket = 0;
|
|
12
12
|
replayIndex = 0;
|
|
13
|
+
pendingHostOperations = new Set();
|
|
14
|
+
hostReady;
|
|
15
|
+
/// A host operation retains its borrowed inputs until its completion is queued.
|
|
16
|
+
/// Promise callbacks only enqueue work; frame execution stays in this scheduler.
|
|
17
|
+
submitHost(id, operation, completed, failed) {
|
|
18
|
+
let completion;
|
|
19
|
+
const deliver = (resume) => {
|
|
20
|
+
this.pendingHostOperations.delete(completion);
|
|
21
|
+
this.enqueue(id, resume);
|
|
22
|
+
this.hostReady?.();
|
|
23
|
+
this.hostReady = undefined;
|
|
24
|
+
};
|
|
25
|
+
completion = operation.then((result) => deliver(() => completed(result)), (error) => deliver(() => failed(error)));
|
|
26
|
+
this.pendingHostOperations.add(completion);
|
|
27
|
+
}
|
|
28
|
+
/// A terminal VM failure cannot execute more source instructions. Producers
|
|
29
|
+
/// still drain before their continuations and borrowed frame references retire.
|
|
30
|
+
async retireHost() {
|
|
31
|
+
await Promise.all(this.pendingHostOperations);
|
|
32
|
+
this.ready.length = 0;
|
|
33
|
+
this.timers.length = 0;
|
|
34
|
+
}
|
|
13
35
|
constructor(trace, policy) {
|
|
14
36
|
this.trace = trace;
|
|
15
37
|
this.policy = policy;
|
|
@@ -42,19 +64,36 @@ export class FrameScheduler {
|
|
|
42
64
|
this.timers.splice(index, 1);
|
|
43
65
|
};
|
|
44
66
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
67
|
+
hasRunnableWork() {
|
|
68
|
+
return this.ready.length > 0;
|
|
69
|
+
}
|
|
70
|
+
advanceSlice() {
|
|
71
|
+
this.trace.advanceVirtualClock(this.trace.replay.virtual_clock.tick_ms, null);
|
|
72
|
+
this.fireTimers();
|
|
73
|
+
}
|
|
74
|
+
fireTimers() {
|
|
75
|
+
for (let index = 0; index < this.timers.length;) {
|
|
76
|
+
if (this.timers[index].at <= this.trace.virtualTimeMs) {
|
|
77
|
+
this.timers.splice(index, 1)[0].wake();
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
index += 1;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
async run() {
|
|
85
|
+
while (this.ready.length > 0 ||
|
|
86
|
+
this.timers.length > 0 ||
|
|
87
|
+
this.pendingHostOperations.size > 0) {
|
|
88
|
+
if (this.ready.length === 0 && this.timers.length === 0) {
|
|
89
|
+
await new Promise((resolve) => {
|
|
90
|
+
this.hostReady = resolve;
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
if (this.ready.length === 0 && this.timers.length > 0) {
|
|
48
94
|
const next = Math.min(...this.timers.map((timer) => timer.at));
|
|
49
95
|
this.trace.advanceVirtualClock(next - this.trace.virtualTimeMs, null);
|
|
50
|
-
|
|
51
|
-
if (this.timers[index].at <= next) {
|
|
52
|
-
this.timers.splice(index, 1)[0].wake();
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
index += 1;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
96
|
+
this.fireTimers();
|
|
58
97
|
}
|
|
59
98
|
if (this.ready.length === 0)
|
|
60
99
|
continue;
|
|
@@ -1,15 +1,22 @@
|
|
|
1
|
+
import { type DirectoryOperation } from "./browser-directory.js";
|
|
1
2
|
import type { Pipes } from "./pipes.js";
|
|
2
3
|
import { type VmValue } from "../values.js";
|
|
3
4
|
import { Mt19937 } from "./mt19937.js";
|
|
4
|
-
import type { RuntimeFamilyEntry, RuntimeVariantRole, TrapName, VariantShape } from "./package.js";
|
|
5
|
+
import type { AggregateShape, RuntimeFamilyEntry, RuntimeVariantRole, TrapName, VariantShape } from "./package.js";
|
|
5
6
|
export declare class ShimFault extends Error {
|
|
6
7
|
readonly trap: TrapName;
|
|
7
8
|
constructor(trap: TrapName, message: string);
|
|
8
9
|
}
|
|
9
10
|
export interface ShimHost {
|
|
11
|
+
readonly argv: readonly string[];
|
|
12
|
+
unixTimeMillis(): number;
|
|
13
|
+
fileError(operation: "HasError" | "LastErrorKind" | "LastErrno" | "LastError"): VmValue;
|
|
14
|
+
calendarBridge?: (request: string) => string;
|
|
10
15
|
pipes?: Pipes;
|
|
11
16
|
newPipe?(capacity: number): VmValue;
|
|
12
|
-
|
|
17
|
+
generatorStream?(generator: VmValue): VmValue;
|
|
18
|
+
encoderSink?(sink: VmValue, encoder: VmValue): VmValue;
|
|
19
|
+
cloneSink?(sink: VmValue): VmValue;
|
|
13
20
|
releaseValue?(value: VmValue): void;
|
|
14
21
|
writeStdout(text: string): void;
|
|
15
22
|
writeStderr(text: string): void;
|
|
@@ -17,8 +24,254 @@ export interface ShimHost {
|
|
|
17
24
|
regexPatterns: readonly string[];
|
|
18
25
|
enumValue(shape: VariantShape, role: RuntimeVariantRole, payload: VmValue[]): VmValue;
|
|
19
26
|
}
|
|
20
|
-
export type RuntimeShim = (host: ShimHost, args: VmValue[], shape: VariantShape | null) => VmValue;
|
|
21
|
-
export
|
|
22
|
-
|
|
23
|
-
export
|
|
24
|
-
|
|
27
|
+
export type RuntimeShim = (host: ShimHost, args: VmValue[], shape: VariantShape | null, aggregate: AggregateShape | null) => VmValue;
|
|
28
|
+
export type HostBridges = Pick<import("../types.js").RunOptions, "codecBridge" | "calendarBridge" | "directoryRoots">;
|
|
29
|
+
type BridgeRequirement = "codecBridge" | "calendarBridge";
|
|
30
|
+
export type DirectoryRegistration = {
|
|
31
|
+
kind: "directory";
|
|
32
|
+
operation: DirectoryOperation;
|
|
33
|
+
};
|
|
34
|
+
export type Refused = {
|
|
35
|
+
kind: "refused";
|
|
36
|
+
category: "native_only" | "not_implemented";
|
|
37
|
+
capability: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
message?: string;
|
|
40
|
+
};
|
|
41
|
+
type Ordinary = {
|
|
42
|
+
kind: "ordinary";
|
|
43
|
+
shim: RuntimeShim;
|
|
44
|
+
bridge?: BridgeRequirement;
|
|
45
|
+
};
|
|
46
|
+
export type RuntimeContinuation = {
|
|
47
|
+
handler: "actor_caller" | "actor_refusal_log" | "structural_format" | "utf8_decode" | "close";
|
|
48
|
+
} | {
|
|
49
|
+
handler: "supervisor_pool";
|
|
50
|
+
operation: Extract<RuntimeFamilyEntry, {
|
|
51
|
+
family: "SupervisorPool";
|
|
52
|
+
}>["detail"];
|
|
53
|
+
} | ({
|
|
54
|
+
handler: "collection";
|
|
55
|
+
} & ({
|
|
56
|
+
family: "Vector";
|
|
57
|
+
operation: "Contains" | "Set" | "Clear";
|
|
58
|
+
} | {
|
|
59
|
+
family: "Map";
|
|
60
|
+
operation: Extract<RuntimeFamilyEntry, {
|
|
61
|
+
family: "Map";
|
|
62
|
+
}>["detail"];
|
|
63
|
+
} | {
|
|
64
|
+
family: "Set";
|
|
65
|
+
operation: Extract<RuntimeFamilyEntry, {
|
|
66
|
+
family: "Set";
|
|
67
|
+
}>["detail"];
|
|
68
|
+
})) | {
|
|
69
|
+
handler: "shared";
|
|
70
|
+
operation: Extract<RuntimeFamilyEntry["family"], "RcNew" | "RcClone" | "RcDowngrade" | "WeakCloneRc" | "WeakUpgradeRc" | "RcGet" | "RcIsUnique" | "RcSet" | "RcStrongCount" | "RcWeakCount">;
|
|
71
|
+
};
|
|
72
|
+
export type RuntimeRegistration = Ordinary | Refused | ({
|
|
73
|
+
kind: "resumable";
|
|
74
|
+
} & RuntimeContinuation);
|
|
75
|
+
export declare function registrationRefusal(registration: RuntimeRegistration | DirectoryRegistration | {
|
|
76
|
+
kind: "resumable";
|
|
77
|
+
bridge: BridgeRequirement;
|
|
78
|
+
}, bridges: HostBridges): Refused | null;
|
|
79
|
+
export declare const CODEC_REGISTRATION: {
|
|
80
|
+
readonly kind: "resumable";
|
|
81
|
+
readonly bridge: "codecBridge";
|
|
82
|
+
};
|
|
83
|
+
export declare function resolveRuntime(entry: RuntimeFamilyEntry): RuntimeRegistration;
|
|
84
|
+
export declare function resolveExtern(entry: {
|
|
85
|
+
symbol: string;
|
|
86
|
+
native_capability?: string | null;
|
|
87
|
+
}): Ordinary | Refused | DirectoryRegistration;
|
|
88
|
+
type SuspendTerm = Extract<import("./package.js").TermV1, {
|
|
89
|
+
op: "suspend";
|
|
90
|
+
}>;
|
|
91
|
+
export declare function suspensionRefusal(kind: SuspendTerm["kind"]): Refused | null;
|
|
92
|
+
type NativeIoTerm = Extract<SuspendTerm, {
|
|
93
|
+
kind: "NativeIo";
|
|
94
|
+
}>;
|
|
95
|
+
declare const NATIVE_IO_ROUTES: {
|
|
96
|
+
readonly StdinReadLine: "StdinReadLine";
|
|
97
|
+
readonly SinkFinish: "SinkFinish";
|
|
98
|
+
readonly TcpRead: Refused;
|
|
99
|
+
readonly TcpWrite: Refused;
|
|
100
|
+
readonly TcpAccept: Refused;
|
|
101
|
+
readonly TcpConnect: Refused;
|
|
102
|
+
readonly TcpConnectTimeout: Refused;
|
|
103
|
+
readonly TlsConnect: Refused;
|
|
104
|
+
readonly TlsRead: Refused;
|
|
105
|
+
readonly TlsWrite: Refused;
|
|
106
|
+
readonly FileRead: "FileRead";
|
|
107
|
+
readonly FileWrite: "FileWrite";
|
|
108
|
+
};
|
|
109
|
+
type ExecutableNativeIo = NativeIoTerm & {
|
|
110
|
+
detail: {
|
|
111
|
+
operation: Extract<(typeof NATIVE_IO_ROUTES)[keyof typeof NATIVE_IO_ROUTES], string>;
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
export declare function resolveSuspension(term: SuspendTerm): Refused | {
|
|
115
|
+
kind: "resumable";
|
|
116
|
+
term: ExecutableNativeIo;
|
|
117
|
+
} | {
|
|
118
|
+
kind: "resumable";
|
|
119
|
+
term: ({
|
|
120
|
+
span?: import("./instructions.generated.js").SpanV1 | null | null;
|
|
121
|
+
} & {
|
|
122
|
+
op: "suspend";
|
|
123
|
+
request_shapes?: import("./instructions.generated.js").RequestShapes | null | null;
|
|
124
|
+
result_shape?: number | null | null;
|
|
125
|
+
error_shape?: number | null | null;
|
|
126
|
+
inputs: Array<import("./instructions.generated.js").BoundaryOperand>;
|
|
127
|
+
result: import("./instructions.generated.js").CallResult;
|
|
128
|
+
resumes: Array<import("./instructions.generated.js").Edge>;
|
|
129
|
+
cancel: import("./instructions.generated.js").Edge | null;
|
|
130
|
+
unwind: import("./instructions.generated.js").Edge | null;
|
|
131
|
+
} & {
|
|
132
|
+
kind: "Sleep";
|
|
133
|
+
detail?: null | null | null;
|
|
134
|
+
}) | ({
|
|
135
|
+
span?: import("./instructions.generated.js").SpanV1 | null | null;
|
|
136
|
+
} & {
|
|
137
|
+
op: "suspend";
|
|
138
|
+
request_shapes?: import("./instructions.generated.js").RequestShapes | null | null;
|
|
139
|
+
result_shape?: number | null | null;
|
|
140
|
+
error_shape?: number | null | null;
|
|
141
|
+
inputs: Array<import("./instructions.generated.js").BoundaryOperand>;
|
|
142
|
+
result: import("./instructions.generated.js").CallResult;
|
|
143
|
+
resumes: Array<import("./instructions.generated.js").Edge>;
|
|
144
|
+
cancel: import("./instructions.generated.js").Edge | null;
|
|
145
|
+
unwind: import("./instructions.generated.js").Edge | null;
|
|
146
|
+
} & {
|
|
147
|
+
kind: "Await";
|
|
148
|
+
detail?: null | null | null;
|
|
149
|
+
}) | ({
|
|
150
|
+
span?: import("./instructions.generated.js").SpanV1 | null | null;
|
|
151
|
+
} & {
|
|
152
|
+
op: "suspend";
|
|
153
|
+
request_shapes?: import("./instructions.generated.js").RequestShapes | null | null;
|
|
154
|
+
result_shape?: number | null | null;
|
|
155
|
+
error_shape?: number | null | null;
|
|
156
|
+
inputs: Array<import("./instructions.generated.js").BoundaryOperand>;
|
|
157
|
+
result: import("./instructions.generated.js").CallResult;
|
|
158
|
+
resumes: Array<import("./instructions.generated.js").Edge>;
|
|
159
|
+
cancel: import("./instructions.generated.js").Edge | null;
|
|
160
|
+
unwind: import("./instructions.generated.js").Edge | null;
|
|
161
|
+
} & {
|
|
162
|
+
kind: "Yield";
|
|
163
|
+
detail?: null | null | null;
|
|
164
|
+
}) | ({
|
|
165
|
+
span?: import("./instructions.generated.js").SpanV1 | null | null;
|
|
166
|
+
} & {
|
|
167
|
+
op: "suspend";
|
|
168
|
+
request_shapes?: import("./instructions.generated.js").RequestShapes | null | null;
|
|
169
|
+
result_shape?: number | null | null;
|
|
170
|
+
error_shape?: number | null | null;
|
|
171
|
+
inputs: Array<import("./instructions.generated.js").BoundaryOperand>;
|
|
172
|
+
result: import("./instructions.generated.js").CallResult;
|
|
173
|
+
resumes: Array<import("./instructions.generated.js").Edge>;
|
|
174
|
+
cancel: import("./instructions.generated.js").Edge | null;
|
|
175
|
+
unwind: import("./instructions.generated.js").Edge | null;
|
|
176
|
+
} & {
|
|
177
|
+
kind: "GeneratorNext";
|
|
178
|
+
detail?: null | null | null;
|
|
179
|
+
}) | ({
|
|
180
|
+
span?: import("./instructions.generated.js").SpanV1 | null | null;
|
|
181
|
+
} & {
|
|
182
|
+
op: "suspend";
|
|
183
|
+
request_shapes?: import("./instructions.generated.js").RequestShapes | null | null;
|
|
184
|
+
result_shape?: number | null | null;
|
|
185
|
+
error_shape?: number | null | null;
|
|
186
|
+
inputs: Array<import("./instructions.generated.js").BoundaryOperand>;
|
|
187
|
+
result: import("./instructions.generated.js").CallResult;
|
|
188
|
+
resumes: Array<import("./instructions.generated.js").Edge>;
|
|
189
|
+
cancel: import("./instructions.generated.js").Edge | null;
|
|
190
|
+
unwind: import("./instructions.generated.js").Edge | null;
|
|
191
|
+
} & {
|
|
192
|
+
kind: "Safepoint";
|
|
193
|
+
detail: import("./instructions.generated.js").SafepointDetail;
|
|
194
|
+
}) | ({
|
|
195
|
+
span?: import("./instructions.generated.js").SpanV1 | null | null;
|
|
196
|
+
} & {
|
|
197
|
+
op: "suspend";
|
|
198
|
+
request_shapes?: import("./instructions.generated.js").RequestShapes | null | null;
|
|
199
|
+
result_shape?: number | null | null;
|
|
200
|
+
error_shape?: number | null | null;
|
|
201
|
+
inputs: Array<import("./instructions.generated.js").BoundaryOperand>;
|
|
202
|
+
result: import("./instructions.generated.js").CallResult;
|
|
203
|
+
resumes: Array<import("./instructions.generated.js").Edge>;
|
|
204
|
+
cancel: import("./instructions.generated.js").Edge | null;
|
|
205
|
+
unwind: import("./instructions.generated.js").Edge | null;
|
|
206
|
+
} & {
|
|
207
|
+
kind: "Ask";
|
|
208
|
+
detail: import("./instructions.generated.js").AskDetail;
|
|
209
|
+
}) | ({
|
|
210
|
+
span?: import("./instructions.generated.js").SpanV1 | null | null;
|
|
211
|
+
} & {
|
|
212
|
+
op: "suspend";
|
|
213
|
+
request_shapes?: import("./instructions.generated.js").RequestShapes | null | null;
|
|
214
|
+
result_shape?: number | null | null;
|
|
215
|
+
error_shape?: number | null | null;
|
|
216
|
+
inputs: Array<import("./instructions.generated.js").BoundaryOperand>;
|
|
217
|
+
result: import("./instructions.generated.js").CallResult;
|
|
218
|
+
resumes: Array<import("./instructions.generated.js").Edge>;
|
|
219
|
+
cancel: import("./instructions.generated.js").Edge | null;
|
|
220
|
+
unwind: import("./instructions.generated.js").Edge | null;
|
|
221
|
+
} & {
|
|
222
|
+
kind: "Join";
|
|
223
|
+
detail: import("./instructions.generated.js").JoinDetail;
|
|
224
|
+
}) | ({
|
|
225
|
+
span?: import("./instructions.generated.js").SpanV1 | null | null;
|
|
226
|
+
} & {
|
|
227
|
+
op: "suspend";
|
|
228
|
+
request_shapes?: import("./instructions.generated.js").RequestShapes | null | null;
|
|
229
|
+
result_shape?: number | null | null;
|
|
230
|
+
error_shape?: number | null | null;
|
|
231
|
+
inputs: Array<import("./instructions.generated.js").BoundaryOperand>;
|
|
232
|
+
result: import("./instructions.generated.js").CallResult;
|
|
233
|
+
resumes: Array<import("./instructions.generated.js").Edge>;
|
|
234
|
+
cancel: import("./instructions.generated.js").Edge | null;
|
|
235
|
+
unwind: import("./instructions.generated.js").Edge | null;
|
|
236
|
+
} & {
|
|
237
|
+
kind: "StreamSend";
|
|
238
|
+
detail: import("./instructions.generated.js").StreamSendDetail;
|
|
239
|
+
}) | ({
|
|
240
|
+
span?: import("./instructions.generated.js").SpanV1 | null | null;
|
|
241
|
+
} & {
|
|
242
|
+
op: "suspend";
|
|
243
|
+
request_shapes?: import("./instructions.generated.js").RequestShapes | null | null;
|
|
244
|
+
result_shape?: number | null | null;
|
|
245
|
+
error_shape?: number | null | null;
|
|
246
|
+
inputs: Array<import("./instructions.generated.js").BoundaryOperand>;
|
|
247
|
+
result: import("./instructions.generated.js").CallResult;
|
|
248
|
+
resumes: Array<import("./instructions.generated.js").Edge>;
|
|
249
|
+
cancel: import("./instructions.generated.js").Edge | null;
|
|
250
|
+
unwind: import("./instructions.generated.js").Edge | null;
|
|
251
|
+
} & {
|
|
252
|
+
kind: "StreamNext";
|
|
253
|
+
detail: import("./instructions.generated.js").StreamNextDetail;
|
|
254
|
+
}) | ({
|
|
255
|
+
span?: import("./instructions.generated.js").SpanV1 | null | null;
|
|
256
|
+
} & {
|
|
257
|
+
op: "suspend";
|
|
258
|
+
request_shapes?: import("./instructions.generated.js").RequestShapes | null | null;
|
|
259
|
+
result_shape?: number | null | null;
|
|
260
|
+
error_shape?: number | null | null;
|
|
261
|
+
inputs: Array<import("./instructions.generated.js").BoundaryOperand>;
|
|
262
|
+
result: import("./instructions.generated.js").CallResult;
|
|
263
|
+
resumes: Array<import("./instructions.generated.js").Edge>;
|
|
264
|
+
cancel: import("./instructions.generated.js").Edge | null;
|
|
265
|
+
unwind: import("./instructions.generated.js").Edge | null;
|
|
266
|
+
} & {
|
|
267
|
+
kind: "Select";
|
|
268
|
+
detail: import("./instructions.generated.js").SelectDetail;
|
|
269
|
+
});
|
|
270
|
+
};
|
|
271
|
+
export declare function decodeUtf8Checked(value: VmValue): {
|
|
272
|
+
value: string;
|
|
273
|
+
} | {
|
|
274
|
+
validUpTo: number;
|
|
275
|
+
errorLen: number | null;
|
|
276
|
+
};
|
|
277
|
+
export {};
|