@endge/computation-sandbox 0.1.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.
@@ -0,0 +1,2 @@
1
+ import { EndgePlugin } from '@endge/core';
2
+ export declare const EndgeComputationSandboxPlugin: EndgePlugin;
@@ -0,0 +1,18 @@
1
+ import { ComputationSandboxAdapter, ComputationSandboxRequest } from '@endge/core';
2
+ export interface QuickJSComputationSandboxOptions {
3
+ workerCount?: number;
4
+ watchdogMs?: number;
5
+ }
6
+ /** Batched Worker pool adapter for the core computation runtime. */
7
+ export declare class QuickJSComputationSandbox implements ComputationSandboxAdapter {
8
+ private readonly workers;
9
+ private readonly queue;
10
+ private nextId;
11
+ private scheduled;
12
+ private disposed;
13
+ constructor(options?: QuickJSComputationSandboxOptions);
14
+ execute(request: ComputationSandboxRequest): Promise<unknown>;
15
+ dispose(): void;
16
+ private flush;
17
+ }
18
+ export declare function createQuickJSComputationSandbox(options?: QuickJSComputationSandboxOptions): QuickJSComputationSandbox;