@nuvin/agent-core 0.2.1-rc.1 → 0.3.0-rc.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/dist/VERSION +2 -2
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +1 -1
- package/dist/chunk-C7XNCD5L.js +1 -0
- package/dist/chunk-D5IVWJHX.js +1 -1
- package/dist/chunk-EQGBU73Q.js +1 -0
- package/dist/chunk-FFIZ6TKW.js +1 -1
- package/dist/chunk-GAZGO6N7.js +1 -1
- package/dist/chunk-IUZALP6K.js +1 -1
- package/dist/chunk-LIE76IJA.js +1 -1
- package/dist/chunk-X7VAACWY.js +1 -1
- package/dist/chunk-YNOIG4FD.js +1 -1
- package/dist/formats/index.js +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/isolate/index.d.ts +3 -0
- package/dist/isolate/index.js +1 -0
- package/dist/isolate/isolated-vm.d.ts +52 -0
- package/dist/models/index.js +1 -1
- package/dist/shared/abort-aware-semaphore.d.ts +1 -0
- package/dist/shared/index.js +1 -1
- package/dist/shared/types.d.ts +51 -3
- package/dist/tools/core/internal-tool-runtime.d.ts +8 -2
- package/dist/tools/core/runtime-manager-tools.d.ts +106 -2
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.js +1 -1
- package/dist/tools/program/program-isolate.d.ts +37 -0
- package/dist/tools/program/program-tool.d.ts +7 -0
- package/dist/tools/program/strict-json.d.ts +9 -0
- package/package.json +9 -2
- package/dist/chunk-KIIEBXJF.js +0 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
export type IsolateLimitKind = "memory" | "timeout";
|
|
2
|
+
export declare class IsolationUnavailableError extends Error {
|
|
3
|
+
constructor(message: string, options?: {
|
|
4
|
+
cause?: unknown;
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
export declare class IsolateLimitError extends Error {
|
|
8
|
+
readonly kind: IsolateLimitKind;
|
|
9
|
+
constructor(kind: IsolateLimitKind, message: string, options?: {
|
|
10
|
+
cause?: unknown;
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
interface IsolatedVmReference {
|
|
14
|
+
applySync(thisArg: undefined, args: unknown[], opts?: {
|
|
15
|
+
timeout?: number;
|
|
16
|
+
result?: {
|
|
17
|
+
copy?: boolean;
|
|
18
|
+
};
|
|
19
|
+
}): unknown;
|
|
20
|
+
getSync(key: string, opts: {
|
|
21
|
+
reference: true;
|
|
22
|
+
}): IsolatedVmReference;
|
|
23
|
+
typeof: string;
|
|
24
|
+
}
|
|
25
|
+
interface IsolatedVmContext {
|
|
26
|
+
global: {
|
|
27
|
+
setSync(key: string, value: unknown): void;
|
|
28
|
+
getSync(key: string, opts: {
|
|
29
|
+
reference: true;
|
|
30
|
+
}): IsolatedVmReference;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
interface IsolatedVmScript {
|
|
34
|
+
runSync(ctx: IsolatedVmContext, opts?: {
|
|
35
|
+
timeout?: number;
|
|
36
|
+
}): unknown;
|
|
37
|
+
}
|
|
38
|
+
interface IsolatedVmIsolate {
|
|
39
|
+
createContextSync(): IsolatedVmContext;
|
|
40
|
+
compileScriptSync(src: string): IsolatedVmScript;
|
|
41
|
+
dispose(): void;
|
|
42
|
+
isDisposed: boolean;
|
|
43
|
+
}
|
|
44
|
+
interface IsolatedVmModule {
|
|
45
|
+
Isolate: new (opts: {
|
|
46
|
+
memoryLimit: number;
|
|
47
|
+
}) => IsolatedVmIsolate;
|
|
48
|
+
}
|
|
49
|
+
export declare function loadIsolatedVm(): IsolatedVmModule;
|
|
50
|
+
export declare function classifyIsolateError(error: unknown): IsolateLimitKind | undefined;
|
|
51
|
+
export {};
|
|
52
|
+
//# sourceMappingURL=isolated-vm.d.ts.map
|